<%@ page language="java" contentType="text/html; charset=UTF-8" import="java.util.*"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ include file="../common.jsp"%>
<c:set var="path" value="${pageContext.request.contextPath}"/>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<title></title>
</head>

<body>
	<div class="place">
	    <span>位置：</span>
	    <ul class="placeul">
	    <li><a href="#">患者管理</a></li>
	    <li><a href="#">随访记录</a></li>
	    </ul>
	 </div>
<!-- 添加用户form    此节点内部的内容会在弹出框内显示,默认隐藏此节点   -->
    <div id="fun_content" class="hidden" style="display:none;">
      <form id="funForm" class="form-horizontal" method="post" action="">
        <div class="row">
      		 <div class="control-group span12">
            	<label class="control-label">病历号:</label>
            	<div class="controls">
              		<input type="text" class="input-normal control-text" name="mrn" id="fun_mrn">
              		<span class="validate_color">*</span>
            </div>
          </div>
        </div>
        <div class="row">
          <div class="control-group span14">
            <label class="control-label">医师编号:</label>
            <div class="controls">
              	<input type="text" class="input-normal control-text" name="eno" id="fun_eno">
              	<span class="validate_color">*</span>
            </div>
          </div>
          <div class="control-group span14">
          	 <label class="control-label">治疗日期:</label>
          	 <div class="controls">
 				<input type="text" id="fun_f_date" name="f_date_String"/>
             	<span class="validate_color">*</span>
            </div>
          </div>
          <div class="control-group span14">
            <label class="control-label">随访内容:</label>
            <div class="controls control-row4">
			   		<textarea class="input-large" name="memo" id="fun_memo" ></textarea>
            </div>
          </div>
          <input type="text" style="display: none;" id="fun_id" name="id"/>
        </div>
      </form>
    </div>

    <div class="rightinfo" >
    
    <div class="tools">
    
    	<ul class="toolbar">
         <li class="pmsncontrol" id="add_Fun"><span><img src="${path}/images/t01.png" /></span>添加</li>
         <li class="pmsncontrol" onclick="del_fun('funSelectCbx')"><span><img src="${path}/images/t03.png" ></span>删除</li>       
        </ul>
       	
       	<ul class="toolbar1">
    	 <li onclick="showFunPageDataList(1)"><span><img src="${path}/images/t04.png" /></span>查询</li>
        </ul>
       	<ul class="toolbar2">
       	 <li>
       	 		<label>病历号：</label>
       	 		<input type="text" id="fun_search_mrn" value="${chaxun}" style="margin-top:3px;">
       	 </li>
       	 <li class="li_left" style="padding-right: 0px;">
				<label>时间段：</label>
				<input type="text" id="fun_startDate" value="${startDate}" style="width: 180px;margin-top:3px;"/>
		 </li>
		 <li >
				<label>-</label>
				<input type="text" id="fun_endDate" value="${endDate}" style="width: 180px;margin-top:3px;"/>
		 </li>
       	</ul>
        
        
    
    </div>
    <table class="tablelist" id="funTable">
    	<thead>
    	<tr>
        <th class="cbx"><input name="" type="checkbox" value="" id="funSelectAll" onclick="selectAllCheck('funSelectAll','funSelectCbx')"/></th>
        <th>病历号</th>
        <th>姓名</th>
		<th>医师职工号</th>
        <th>医师姓名</th>
        <th>随访记录</th>
        <th>随访日期</th>
        <th class="operate">操作</th>
        </tr>
        </thead>
  	 	<c:if test="${!empty funPageInfo}">
  	 		<c:forEach items="${funBeanList }" var="funList">
  	 			<tr>
			        <td><input name="funSelectCbx" id='fun_${funList.id}' type="checkbox" value="" onclick="cbxCheck('funSelectAll','funSelectCbx');"/></td>
			        <td title="${funList.mrn}">${funList.mrn}</td>
			        <td title="${funList.p_name}">${funList.p_name}</td>
					<td title="${funList.eno }">${funList.eno }</td>
					<td title="${funList.d_name }">${funList.d_name }</td>
					<td title="${funList.memo }">${funList.memo }</td>
					<td title="${funList.f_dateString }">${funList.f_dateString }</td>
			        <td>
			        	<ul class="tabletoolbar"  id='fun_operate${funList.id}'>
			        		<li class="pmsncontrol" onclick="funEdit('${funList.id}')"><span><img src="${path}/images/table_t01.png"></span>编辑</li>
			        		<li class="pmsncontrol" onclick="messageAlert(4,'你确定要删除选择的用户吗？',function(){choose_open,deleteFun(${funList.id})},1)"><span><img src="${path}/images/table_t02.png"></span>删除</li>
			        	</ul>	
      				</td>
       			 </tr> 
  	 		</c:forEach>
  	 	</c:if>
        </tbody>
    </table>
	
    <div id="fun_box">
    </div>
    
    </div>
    <script type="text/javascript">
	$(function(){
		funManagerInit();
		if(window.parent.currentUserPmsn == normalLimit){
			pmsnControl();
		}
		getDivPage("fun",'${funPageInfo}',showFunPageDataList);
	});
	</script>
</body>
</html>